package io.renren.modules.order.service;

import io.renren.common.service.CrudService;
import io.renren.modules.order.dto.OrderPaymentDTO;
import io.renren.modules.order.entity.OrderPaymentEntity;

import java.util.List;
import java.util.Map;

/**
 * 订单费用表
 *
 * @author Mark sunlightcs@gmail.com
 * @since 1.0.0 2024-12-07
 */
public interface OrderPaymentService extends CrudService<OrderPaymentEntity, OrderPaymentDTO> {

    /**
     * 根据订单ID删除订单费用表
     * @param orderId
     */
    void deleteByOrderId(Long orderId);

    /**
     * 根据订单ID集合查询订单费用表
     * @param orderIdList
     * @return
     */
    List<OrderPaymentDTO> getOrderPaymentList(List<Long> orderIdList);

    /**
     * 查询订单费用表
     * @return
     */
    List<OrderPaymentDTO> getAllOrderPaymentList(Map<String, Object> params);

    /**
     * 根据订单ID查询付款记录
     * @param orderId
     * @return
     */
    List<OrderPaymentDTO> listByOrderId(Long orderId);

    /**
     * 保存付款记录
     * @param dto
     */
    void saveOrderPayment(OrderPaymentDTO dto);

    /**
     * 审核付款
     * @param dto
     */
    void examineOrderPay(OrderPaymentDTO dto);
}